import { createStore, combineReducers, applyMiddleware } from "redux";
import createSagaMiddleware from "redux-saga";
import count from "./reducers/count";
import topics from "./reducers/topics";
import rootSaga from "../actions/root";
const saga = createSagaMiddleware();

const store = createStore(
    combineReducers({
        count,
        topics,
    }),
    applyMiddleware(saga)
);

saga.run(rootSaga);
export default store;
